home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
powerb5.zip
/
P5WPR007.TIP
< prev
next >
Wrap
Text File
|
1993-06-01
|
2KB
|
65 lines
One of my favorite WordPerfect tricks lets me use the length
of a document, in pages, in a macro. This is useful if you
want to put a statement such as "Page x of y" in a header or
footer, or if you need to know the size of the document
you'll be faxing or sending via an expensive courier.
The trick involves a macro that goes to the bottom of the
file, saves the page number as a variable, then does
something useful with the variable. As an example, I've
included a macro that creates a footer that lists the
current page number and the total number of pages. If you
run the macro just before you print, the number will be
accurate.
Neville G. Weekes
Boston, Massachusetts
Editor's Note: This is an incredibly useful tip if you want
to ensure that readers don't mistake a partial document for
a complete one. What's more, you can easily adapt the macro
to other jobs, like adding a page count to a fax cover
sheet. It can even help if you're sending hard copy through
the post office: If you know approximately how much your
stationery weighs, you can write a macro that computes how
much postage you'll need to mail it.
Mr Weekes' macro, which creates a footer which says "Page X
of Y," must normally be entered via the WordPerfect macro
editor, but you don't need to do that; the macro is present
on your PowerBase *.* Volume 5 diskette as the file
P5WPR\ALTP.WPM.
The text of the macro is shown below for reference.
{DISPLAY OFF}
{Home}{Home}{Home}{Down}
{ASSIGN}LastPage~{SYSTEM}Page~~
{Goto}{Goto}
{ON NOT FOUND}{GO}Top~~
{Search Left}{Format}PFA{Search}
{IF}{STATE}&512~
{Backspace}
{ELSE}
{Backspace}Y
{END IF}
{GO}MakeFoot~
{LABEL}Top~
{Home}{Home}{Home}{Up}
{LABEL}MakeFoot~
{Format}PFAP
Page {^B} of {VARIABLE}LastPage~
{Exit}{Exit}
{Goto}{Goto}
Title: Getting to the Bottom of WP
Category: WPR
Issue Date: November, 1992
Editor: Brett Glass
Supplementary Files: P5WPR\ALTP.WPM
Filename: P5WPR007.TIP